<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <show-button :init="myInit"></show-button>
    </div>
    <script src="../lib/vue.js"></script>
    <script>
      let myFirstComponent = {
        props: ['init'],
        data: function () {
          return {
            count: this.init,
          }
        },
        template: `
        <div>
          <input type="button" value="+" @click="count++">
          <input type="text" v-model="count">
          <input type="button" @click="count--" value="-">
        </div>
      `,
      }

      Vue.component('show-button', myFirstComponent)

      new Vue({
        el: '#app',
        data: {
          myInit: 40,
        },
      })
    </script>
  </body>
</html>
